package com.my.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author sjx
 * @date 2025/2/10 13:37
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("wecom_robot")
@AllArgsConstructor
@NoArgsConstructor
public class WecomRobot implements Serializable {

    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 企业微信群id
     */
    @TableField("chat_id")
    private String chatId;

    /**
     * 企业微信群名称
     */
    @TableField("`name`")
    private String name;

    /**
     * 是否添加企业微信群机器人
     */
    @TableField("robot_webhook_flag")
    private Boolean robotWebhookFlag;

    /**
     * 企业微信群机器人
     */
    @TableField("robot_webhook")
    private String robotWebhook;

    /**
     * 状态
     */
    @TableField("status")
    private Boolean status;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @JsonInclude(value = JsonInclude.Include.NON_NULL)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    @JsonInclude(value = JsonInclude.Include.NON_NULL)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    /**
     * 是否删除
     */
    @TableLogic
    private Boolean delFlag;

}
